import 'package:get/get.dart';
import 'package:xinxuan/http/http_util_service.dart';
import 'package:xinxuan/vo/system_address_list_vo.dart';

class AddressProvinceController extends GetxController {

  /// 省份列表
  var providerArr = <SystemAddressItem>[].obs;
  
  @override
  void onReady() {
    getProviderList();
    super.onReady();
  }

  /// 获取省份
  getProviderList() async {
    SystemAddressListVo systemAddressListVo = await HttpUtilService.getSystemRegions();
    providerArr.value = systemAddressListVo.data!;
    update();
  }
}